const db = require("./db.js");

const proSchema = new db.Schema({
    proId:{type:String},
    name:{type:String},
    kind:{type:String},
    brand:{type:String},
    logo:{type:String},
    img:{type:String},
    price:{type:Number},
    message:{type:String},
    stock:{type:Number},
    sales:{type:Number},
    discount:{type:Number},
    tip:{type:Number},
    hot:{type:Boolean}
})

// 根据元对象，创建集合
const pro = db.model("pro", proSchema);

// 将集合对象暴露出去，准备操作数据
module.exports = pro;
